package com.song.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.song.po.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface RoleDao extends BaseMapper<Role> {

   @Select("select * from t_userRole ur" +
       " inner join t_role role on role.role_id = ur.role_id" +
       " ${ew.customSqlSegment}")
   @ResultMap("com.song.dao.RoleDao.roleMap")
   Role getRole(@Param(Constants.WRAPPER)QueryWrapper<Role> queryWrapper1);
}
